package structure.bridging;

/**
 * @author lzp
 * @Date:2023/2/24
 * @description: 修正抽象车类，扩展父类功能
 */
public abstract class RefinedCar extends Car {

	public RefinedCar(Engine engine) {
		super(engine);
	}

	@Override
	public void drive() {
		// 发动引擎
		engine.start();
		// 开车
		System.out.println("驾驶" + getBrand() + "汽车出发啦");
	}

	/**
	 * 获取汽车品牌
	 */
	public abstract String getBrand();
}
